<!--
* @description 装备详情
* @fileName dataDetail.vue
* @author huangyu
* @date 2022/06/17 10:27:37
!-->
<template>
    <div style="line-height:28px;padding: 0 10px;">
        <!-- {{model}} -->
        <!-- {{ strongModel }} -->
        <h3 v-if="model.pingzhi == '英雄'" class="color_yx">{{ model.name }}</h3>
        <h3 v-if="model.pingzhi == '唯一'" class="color_wy">{{ model.name }}</h3>
        <el-row style="margin-bottom:10px;">
            <el-col :span="24">类型：{{ model.type }}</el-col>
            <el-col :span="24">品质：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">{{
                    model.pingzhi
            }}</span></el-col>
            <el-col :span="24">使用等级：{{ model.level }}</el-col>
        </el-row>

        <!-- 武器属性 -->
        <!-- 基础属性 -->
        <div v-if="model.ZBType == 1">
            <el-row v-if="wqBInfo.tList && wqBInfo.tList.length > 0" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in wqBInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">
                        {{ wqBInfo.list[index] }}
                    </span>
                </el-col>
            </el-row>
            <!-- 额外属性 -->
            <el-row v-if="wqEInfo.tList && wqEInfo.tList.length > 0" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in wqEInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">{{ wqEInfo.list[index]
                    }}</span>
                </el-col>
            </el-row>
        </div>

        <!-- 防具属性 -->
        <!-- 基础属性 -->
        <div v-if="model.ZBType == 2">
            <el-row v-if="fjBInfo.tList && fjBInfo.tList.length > 0" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in fjBInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">{{ fjBInfo.list[index]
                    }}</span>
                </el-col>
            </el-row>
            <!-- 额外属性 -->
            <el-row v-if="fjEInfo.tList && fjEInfo.tList.length" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in fjEInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">
                        {{ fjEInfo.list[index] }}
                        {{ strongModel && strongModel.hp && item == '生命上限' ? '+' + model.strongModel.hp : '' }}
                    </span>
                </el-col>
            </el-row>
        </div>

        <!-- 饰品属性 -->
        <!-- 基础属性 -->
        <div v-if="model.ZBType == 3">
            <el-row v-if="spBInfo.tList && spBInfo.tList.length > 0" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in spBInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">{{ spBInfo.list[index]
                    }}</span>
                </el-col>
            </el-row>
            <!-- 额外属性 -->
            <el-row v-if="spEInfo.tList && spEInfo.tList.length" style="margin-bottom:10px;">
                <el-col :span="12" v-for="(item, index) in spEInfo.tList" :key="index">
                    {{ item }}：<span :class="model.pingzhi == '英雄' ? 'color_yx' : 'color_wy'">{{ spEInfo.list[index]
                    }}</span>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
import ZBInfo from "@/components/game/aion/data.js"
import { sxItemArr, sxItemArrT, WQbItemArr, WQbItemArrT, WQeItemArr, WQeItemArrT, FJbItemArr, FJbItemArrT, FJeItemArr, FJeItemArrT, SPbItemArr, SPbItemArrT, SPeItemArr, SPeItemArrT } from "@/components/game/aion/data.js"
export default {
    props: {
        model: {},
    },
    components: {},
    data() {
        return {
            // model: {},
            ZBInfoS: ZBInfo,
            sxItemArrList: [],
            sxInfo: {},
            wqBInfo: {},
            wqEInfo: {},
            fjBInfo: {},
            fjEInfo: {},
            spBInfo: {},
            spEInfo: {},
        }
    },
    mounted() {
    },
    methods: {
        zbInfoData() {
            this.sxInfo = this.ZBInfoS.zbInfoFunction(this.model, sxItemArr, sxItemArrT)
            this.wqBInfo = this.ZBInfoS.zbInfoFunction(this.model, WQbItemArr, WQbItemArrT)
            this.wqEInfo = this.ZBInfoS.zbInfoFunction(this.model, WQeItemArr, WQeItemArrT)
            this.fjBInfo = this.ZBInfoS.zbInfoFunction(this.model, FJbItemArr, FJbItemArrT)
            this.fjEInfo = this.ZBInfoS.zbInfoFunction(this.model, FJeItemArr, FJeItemArrT)
            this.spBInfo = this.ZBInfoS.zbInfoFunction(this.model, SPbItemArr, SPbItemArrT)
            this.spEInfo = this.ZBInfoS.zbInfoFunction(this.model, SPeItemArr, SPeItemArrT)
        },
    },
    watch: {
        model: {
            handler: 'zbInfoData',
            immediate: true,
        },
    }
}
</script>

<style scoped>
</style>